package com.admin.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.admin.dao.AdminDao;
import com.admin.domain.ItemCommand;

@Controller
public class AdminItemListController {

	@Autowired
	private AdminDao adminDao;
	
	@RequestMapping("/shop/itemList.do")
	public ModelAndView process(){
	
		List<ItemCommand> list = adminDao.selectItemList();
		
		ModelAndView mav =  new ModelAndView();
		mav.setViewName("itemList");
		mav.addObject("item", list);
		return mav;
	}
	
}
